<?php

class Images
{
	const PHOTO_PATH = 'photos';

    public static function getAllImages()
    {
		$categories = Categories::getAllCategories();

		$images_list = array();
		foreach($categories as $num=>$cat) {
			$ini_name = self::PHOTO_PATH.DIRECTORY_SEPARATOR.$cat.DIRECTORY_SEPARATOR.'images.ini';
			$ini_images = parse_ini_file($ini_name);
			$images_list[$cat] = $ini_images;
		}

		return $images_list;
    }

	public static function getImages($id)
	{
		$categories = Categories::getAllCategories();

		$images_list = array();

		$ini_name = self::PHOTO_PATH.DIRECTORY_SEPARATOR.$id.DIRECTORY_SEPARATOR.'images.ini';
		$ini_images = parse_ini_file($ini_name);



		return array($id=>$ini_images);
	}
}